<template>
  <basic-container>
    <div>
      <el-page-header :icon="ArrowLeft" content="导出任务概要" @back="proxy.$router.push('/evidence')"/>

      <div class="main" v-if="isShow">
        <div class="task">
          <div>防伪电子印章概要</div>
          <table class="task_box">
            <tr align="left">
              <td>编号：{{sealDetail.antiFakeSealId}}</td>
              <td>名称：{{sealDetail.sealCon.sealName}}</td>
            </tr>
            <tr align="left">
              <td>导出人：{{sealDetail.antiFakeUser}}</td>
              <td>导出时间：{{sealDetail.antiFakeTime}}</td>
            </tr>
            <tr align="left">
              <td colspan="2">导出说明：{{sealDetail.antiFakeIntroduction}}</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </basic-container>
</template>

<script setup>
import {ref,getCurrentInstance} from 'vue';
import {getAntiFakeDetailApi} from '../../../api/sealAntiFake';
import {ElMessage} from 'element-plus';
import {dateFormat} from '../../../utils/util';
import { ArrowLeft } from '@element-plus/icons-vue'

const {proxy} = getCurrentInstance()

//接收传过来的路由信息
const antiFakeSealId = proxy.$route.query.antiFakeSealId

const sealDetail = ref({})
const isShow = ref(false)

const getAntiFakeDetail = () => {
  getAntiFakeDetailApi(antiFakeSealId,0)
  .then(res=>{
    let data = res.data.result
    data.antiFakeTime = dateFormat("YYYY-mm-dd HH:MM:SS",new Date(data.antiFakeTime))
    sealDetail.value = data
    isShow.value = true
    }).catch(res=>{
      ElMessage.error(res)
   })
}
getAntiFakeDetail()
</script>

<style scoped>
/deep/ .el-card__body {
  margin: 10px 20px;
}

.main{
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 50px 100px 20px 100px;
  border-bottom: 1px solid #eee;
}

.task{
  width: 700px;
  border: 1px solid #eee;
  padding: 20px;
  font-size: 12px;
  margin-bottom: 30px;
}

.task_box{
  width: 700px;
  border-left: 1px solid #eee;
  border-top: 1px solid #eee;
  margin-top: 15px
}

.task_box tr td{
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 50%;
  padding: 10px 18px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
</style>
